package com.cdz.charger.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cdz.charger.dto.ReservationDto;
import com.cdz.charger.vo.ReservationVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

import com.cdz.charger.domain.Reservation;

/**
 * 预约Mapper接口
 *
 * @author baefengk2
 * @date 2025-03-10
 */
@Mapper
public interface ReservationMapper extends BaseMapper<Reservation> {
    /**
     * 查询预约
     *
     * @param id 预约主键
     * @return 预约
     */
    public Reservation selectReservationById(Long id);

    /**
     * 查询预约列表
     *
     * @param reservationDto 预约
     * @return 预约集合
     */
    public List<ReservationVo> selectReservationList(ReservationDto reservationDto);

    /**
     * 新增预约
     *
     * @param reservation 预约
     * @return 结果
     */
    public int insertReservation(Reservation reservation);

    /**
     * 修改预约
     *
     * @param reservation 预约
     * @return 结果
     */
    public int updateReservation(Reservation reservation);

    /**
     * 删除预约
     *
     * @param id 预约主键
     * @return 结果
     */
    public int deleteReservationById(Long id);

    /**
     * 批量删除预约
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteReservationByIds(Long[] ids);
}
